3.1611 \(\int \frac {1}{a+\frac {b}{x}} \, dx\)

Optimal. Leaf size=18 \[ \frac {x}{a}-\frac {b \log (a x+b)}{a^2} \]

[Out]

x/a-b*ln(a*x+b)/a^2

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {193, 43} \[ \frac {x}{a}-\frac {b \log (a x+b)}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b/x)^(-1),x]

[Out]

x/a - (b*Log[b + a*x])/a^2

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 193

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {1}{a+\frac {b}{x}} \, dx &=\int \frac {x}{b+a x} \, dx\\ &=\int \left (\frac {1}{a}-\frac {b}{a (b+a x)}\right ) \, dx\\ &=\frac {x}{a}-\frac {b \log (b+a x)}{a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 18, normalized size = 1.00 \[ \frac {x}{a}-\frac {b \log (a x+b)}{a^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b/x)^(-1),x]

[Out]

x/a - (b*Log[b + a*x])/a^2

________________________________________________________________________________________

fricas [A]  time = 1.05, size = 17, normalized size = 0.94 \[ \frac {a x - b \log \left (a x + b\right )}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x),x, algorithm="fricas")

[Out]

(a*x - b*log(a*x + b))/a^2

________________________________________________________________________________________

giac [A]  time = 0.18, size = 19, normalized size = 1.06 \[ \frac {x}{a} - \frac {b \log \left ({\left | a x + b \right |}\right )}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x),x, algorithm="giac")

[Out]

x/a - b*log(abs(a*x + b))/a^2

________________________________________________________________________________________

maple [A]  time = 0.00, size = 19, normalized size = 1.06 \[ \frac {x}{a}-\frac {b \ln \left (a x +b \right )}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b/x),x)

[Out]

x/a-b*ln(a*x+b)/a^2

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 18, normalized size = 1.00 \[ \frac {x}{a} - \frac {b \log \left (a x + b\right )}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x),x, algorithm="maxima")

[Out]

x/a - b*log(a*x + b)/a^2

________________________________________________________________________________________

mupad [B]  time = 1.05, size = 18, normalized size = 1.00 \[ -\frac {b\,\ln \left (b+a\,x\right )-a\,x}{a^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + b/x),x)

[Out]

-(b*log(b + a*x) - a*x)/a^2

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 14, normalized size = 0.78 \[ \frac {x}{a} - \frac {b \log {\left (a x + b \right )}}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b/x),x)

[Out]

x/a - b*log(a*x + b)/a**2

________________________________________________________________________________________